﻿
@if (ShowDialog)
{
    <div class="modal fade show d-block" id="exampleModal" tabindex="-1" role="dialog">
        <div class="modal-dialog modal-l" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title" id="titleLabel">Set Password</h5>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close" @onclick="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body">

                    <EditForm Model="SetPasswordModel" OnValidSubmit="HandleValidSubmit">
                        <DataAnnotationsValidator />
                        <div class="form-group row">
                            <label class="col-sm-4 col-form-label">User Name</label>
                            <div class="col-sm-8">
                                @SetPasswordModel.UserName
                            </div>
                        </div>
                        <div class="form-group row">
                            <label for="password" class="col-sm-4 col-form-label">Password</label>
                            <div class="col-sm-8">
                                <InputText type="password" id="password" class="form-control" @bind-Value="SetPasswordModel.Password"></InputText>
                                <ValidationMessage For="@(() => SetPasswordModel.Password)" />
                            </div>
                        </div>
                        <div class="form-group row">
                            <label for="confirmPassword" class="col-sm-4 col-form-label">Confirm Password</label>
                            <div class="col-sm-8">
                                <InputText type="password" id="confirmPassword" class="form-control" @bind-Value="SetPasswordModel.ConfirmPassword"></InputText>
                                <ValidationMessage For="@(() => SetPasswordModel.ConfirmPassword)" />
                            </div>
                        </div>
                        
                        <div class="form-group row">
                            <label class="col-sm-4 col-form-label"></label>
                            <div class="col-sm-8">
                                <button type="submit" class="btn btn-primary">Save</button>
                            </div>
                        </div>
                    </EditForm>
                </div>
            </div>
        </div>
    </div>
}